<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var time = prompt('请输入整点时间');
        switch (time) {
            case '12':
                alert('中午好');
                break;
            case '16':
                alert('傍晚好');
                break;
            case '23':
                alert('深夜好');
                break;
            default:
                alert('该干啥干啥吧');
        }


    </script>
</head>

<body>

</body>

</html>